package com.xmsit.controller;

import com.xmsit.mapper.AdsAlarmStatLastMonthMapper;
import com.xmsit.mapper.AdsMileageStatLastMonthMapper;
import com.xmsit.mapper.AdsTemperatureStatLastMonthMapper;
import com.xmsit.pojo.*;
import com.xmsit.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/kshdp")
public class KeShiHuaDP {

    @Autowired
    private AdsAlarmStatLastMonthService adsAlarmStatLastMonthService;

    @Autowired
    private AdsCarMileageVelocityService adsCarMileageVelocityService;

    @Autowired
    private AdsConsumeStatLastMonthService adsConsumeStatLastMonthService;

    @Autowired
    private AdsMileageStatLastMonthService adsMileageStatLastMonthService;

    @Autowired
    private AdsTemperatureStatLastMonthService adsTemperatureStatLastMonthService;

    @Autowired
    private AdsConsumeStatDayService adsConsumeStatDayService;


    /**
     * 告警
     * @param adsAlarmStatLastMonth
     * @return
     */
    @RequestMapping("/getAdsAlarmStatLastMonth")
    public List<AdsAlarmStatLastMonth> getAdsAlarmStatLastMonth(@RequestBody AdsAlarmStatLastMonth adsAlarmStatLastMonth) {
        return adsAlarmStatLastMonthService.getAdsAlarmStatLastMonth(adsAlarmStatLastMonth);
    }

    /**
     * 车速里程
     * @param adsCarMileageVelocity
     * @return
     */
    @RequestMapping("/getAdsCarMileageVelocity")
    public List<AdsCarMileageVelocityVo> getAdsCarMileageVelocity(@RequestBody AdsCarMileageVelocity adsCarMileageVelocity) {
        return adsCarMileageVelocityService.getAdsCarMileageVelocity(adsCarMileageVelocity);
    }

    /**
     * 能耗
     * @param adsConsumeStatLastMonth
     * @return
     */
    @RequestMapping("/getAdsConsumeStatLastMonth")
    public List<AdsConsumeStatLastMonth> getAdsConsumeStatLastMonth(@RequestBody AdsConsumeStatLastMonth adsConsumeStatLastMonth) {
        return adsConsumeStatLastMonthService.getAdsConsumeStatLastMonth(adsConsumeStatLastMonth);
    }

    /**
     * 里程,急加速
     * @param adsMileageStatLastMonth
     * @return
     */
    @RequestMapping("/getAdsMileageStatLastMonth")
    public List<AdsMileageStatLastMonth> getAdsMileageStatLastMonth(@RequestBody AdsMileageStatLastMonth adsMileageStatLastMonth) {
        return adsMileageStatLastMonthService.getAdsMileageStatLastMonth(adsMileageStatLastMonth);
    }


    /**
     * 温度
     * @param adsTemperatureStatLastMonth
     * @return
     */
    @RequestMapping("/getAdsTemperatureStatLastMonth")
    public List<AdsTemperatureStatLastMonth> getAdsTemperatureStatLastMonth(@RequestBody AdsTemperatureStatLastMonth adsTemperatureStatLastMonth) {
        return adsTemperatureStatLastMonthService.getAdsTemperatureStatLastMonth(adsTemperatureStatLastMonth);
    }


    @RequestMapping("/getAdsConsumeStatDay")
    public List<AdsConsumeStatDay> getAdsConsumeStatDay(String vin) {
        return adsConsumeStatDayService.getAdsConsumeStatDay(vin);
    }







}
